#!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Project: spd-sxmcc
"""
@author: lyndon
@time Created on 2018/11/2 16:03
@desc
"""

from datetime import datetime, date

from apscheduler.schedulers.blocking import BlockingScheduler
import time

scheduler = BlockingScheduler()


@scheduler.scheduled_job('interval', id='my_job_id', seconds=3)
def my_job():
    print("%s:执行任务:%s" % time.asctime())


# scheduler.add_job(my_job, 'interval', seconds=3)
scheduler.add_job(my_job, 'interval')

scheduler.start()
